//
//  PlayerUpdateModule.m
//  TengineTwo
//
//  Created by StandardUser on 28/02/2012.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "PlayerModule.h"
#import "CGPointExtension.h"

@interface PlayerModule()

//stub

@end

@implementation PlayerModule

@synthesize targetModel; //lazy initialiser

-(void)update:(EntityModel *)e FromT:(float)t
{
    /*
    if(nil == targetModel || nil == targetModel.currentTarget) return;
    
    float easing = 0.5;
    
    //lerp
    float yTarget = [targetModel getPositionOfCurrentTarget].y;
    float delta = yTarget - e.position.y;
    
    float   unitFraction = delta / e.speed;
    int     unitWhole = floorf(unitFraction);
    
    float lerp;
    if(unitWhole > 0)   lerp = e.speed;
    if(unitWhole <= 0)  lerp = unitFraction * e.speed;
    
    CGPoint nextPosition = ccp(e.position.x, e.position.y + lerp * easing);
    e.position = nextPosition;
    */
}

@end
